﻿@namespace AntBlazor
@inherits AntDomComponentBase

@if (_showTotal.Value != null)
{
    <li class="ant-pagination-total-text">
        @if (_showTotal.IsT0)
        {
            @_showTotal.AsT0.Invoke(TotalContext)
        }
        else
        {
            @_showTotal.AsT1(TotalContext);
        }
    </li>
}

@foreach (var page in _listOfPageItem)
{
    <PaginationItem
        Type=@(page.Type)
        Index=page.Index
        Disabled=page.Disabled
        Active=@(PageIndex == page.Index)
        GotoIndex=JumpPage
        DiffIndex=JumpDiff
     />
}

@if (ShowQuickJumper || ShowSizeChanger)
{
    <PaginationOptions
        Total="Total"
        Disabled="Disabled"
        Size="@Size"
        ShowSizeChanger="ShowSizeChanger"
        ShowQuickJumper="ShowQuickJumper"
        PageIndex="PageIndex"
        PageSize="PageSize"
        PageSizeOptions="PageSizeOptions"
        PageIndexChange="OnPageIndexChange"
        PageSizeChange="OnPageSizeChange"/>
}